package com.healthcloud.service;

import com.healthcloud.entity.HlHospitalEntity;
import com.healthcloud.entity.HospitalDepartment;
import com.healthcloud.utils.PageParam;

import java.util.List;

/**
 * 医院信息表
 *
 * @author yucl
 * @email yucailong1111@126.com
 * @date 2017-08-17 09:00:08
 */
public interface HlHospitalService {

	HlHospitalEntity queryObject(Long id);

    List<HlHospitalEntity> queryList(HlHospitalEntity bean, PageParam pageParam);

	int queryTotal(HlHospitalEntity bean);

	void save(HlHospitalEntity hlHospital);

	void update(HlHospitalEntity hlHospital);

	void delete(Long id);

	void deleteBatch(Long[] ids);

    void save(HlHospitalEntity entity, List<HospitalDepartment> hdList);

	void update(HlHospitalEntity hlHospital, List<HospitalDepartment> hdList);

	List<HospitalDepartment> getHospitalDepartmentByHospId(Long id);

	int logicalDeletes(Long[] ids);

	int logicalDelete(Long id);

	HlHospitalEntity queryByHospName(String hospName);

	/**
	 * 根据地区code查询医院列表
	 *
	 * @param areaCode 地区code
	 * @return
	 */
	List<HlHospitalEntity>  getHospitalListByAreaCode(String areaCode, Integer hosType, String ids);

	List<Long> getChildeIds(HlHospitalEntity hospital);

	/**
	 * 根据用户id获取医院信息
	 */
	List<HlHospitalEntity> getHospitalsByUserId(Long userId);

    void bindWHospital(Long id, String hospitalCode);

	List<HlHospitalEntity> searchAll();

	/**
	 * cxxp医院获取子医院id
	 * @return
	 */
	String getCXChildeIds();

	/**
	 * 本医院获取子医院id
	 * @return
	 */
	String getChildeIds();

	/**
	 * 获取本医院id
	 * @return
	 */
	Long getCurrentHospitalId();

	/**
	 * 获取子医院id往下一级
	 * @return
	 */
	List<HlHospitalEntity> getChildesOne(Long organiId);

}
